package entities;

import items.Item;
import items.ItemHolder;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

import components.VectorialDerivationComponent;

public class Player extends Creature implements ItemHolder {

	private static final int PLAYER_HEALTH = 1;

	private List<Item> items;

	private VectorialDerivationComponent velocity;
	private VectorialDerivationComponent acceleration;

	public Player() {
		super(PLAYER_HEALTH);
		items = new ArrayList<Item>();
		velocity = new VectorialDerivationComponent(this);
		acceleration = new VectorialDerivationComponent(this);
		velocity.addDerivation(acceleration);
		addComponent(velocity);
	}

	@Override
	public void pickUp(Item item) {
		if (item != null)
			items.add(item);
	}

	@Override
	public void init(Properties p) {
	}

}
